{template 'common/header'}
<ul class="nav nav-tabs">
	<li><a href="{php echo url('activity/coupon/display', array());}">卡券列表</a></li>
	<li class="active"><a href="javascript:;">卡券详情</a></li>
</ul>
<div class="main">
	<form action="" method="post" id="form-location" class="form-horizontal" enctype="multipart/form-data">
		<div class="panel panel-default" id="step1">
			<div class="panel-heading">
				{$coupon_title}
			</div>
			<div class="panel-body">
				<div class="pull-left" style="width:320px;background:#F4F5F9;margin-right:20px;border:1px solid #E7E7EB">
					<div class="card-title">{$coupon_title}</div>
					<div class="card_section" style="position: relative">
						<div class="shop-panel" id="color-purview" style="background:{$colors[$coupon['color']]}">
							<div class="logo-area">
								<span class="logo pull-left"><img src="{$coupon['logo_url']}" alt=""/></span>
								<div class="pull-left" style="height:38px;line-height:38px">{$coupon['brand_name']}</div>
								<div class="clear"></div>
							</div>
							<div class="msg-area">
								<div class="tick-msg">
									<p><b id="title-purview">{$coupon['title']}</b></p>
									<p id="sub-title-purview">{$coupon['sub_title']}</p>
								</div>
								<p id="sub-time-purview" style="text-align: center">
									{$coupon['extra_date_info']}
								</p>
							</div>
							<div class="deco"></div>
							<div class="cicon">
								<a href="javascript:;" data-id="form1"><i class="fa fa-pencil"></i></a>
							</div>
						</div>
					</div>
					<div class="card-dispose">
						<div class="destroy_type_preview">
							{if $coupon['code_type'] == 3}
							<div class="barcode-area code_preview_3">
								<div class="barcode"></div>
								<p class="code_num">1513-2290-1878</p>
							</div>
							{elseif $coupon['code_type'] == 2}
							<div class="qrcode-area code_preview_2">
								<div class="qrcode"></div>
								<p class="code_num">1513-2290-1878</p>
							</div>
							{else}
							<div class="sn-area code_preview_1">1513-2290-1878</div>
							{/if}
							<p style="text-align: center" id="notice-purview">{$coupon['notice']}</p>
						</div>
						<div class="cicon">
							<a href="javascript:;" data-id="form2"><i class="fa fa-pencil"></i></a>
						</div>
					</div>
					<div class="shop-detail">
						<ul class="list">
							<li>
								<div class="li-panel">
									<div class="li-content">{$coupon_title}设置</div>
									<span class="ricon fa fa-angle-right"></span>
									<div class="cicon">
										<a href="javascript:;" data-id="form3"><i class="fa fa-pencil"></i></a>
									</div>
								</div>
							</li>
							<li>
								<div class="li-panel">
									<div class="li-content">适用门店</div>
									<span class="ricon">{$coupon['location_count']}家</span>
									<div class="cicon">
										<a href="javascript:;" data-id="form4"><i class="fa fa-pencil"></i></a>
									</div>
								</div>
							</li>
						</ul>
					</div>
					<div class="shop-detail">
						<ul class="list">
							<li>
								<div class="li-panel">
									<div class="li-content">立即使用</div>
									<span class="ricon">系统已实现</span>
								</div>
							</li>
							{if !empty($coupon['promotion_url_name'])}
							<li>
								<div class="li-panel" style="border-bottom: none">
									<div class="li-content">{$coupon['promotion_url_name']}</div>
									<div class="ricon"><span>{$coupon['promotion_url_sub_title']}</span><i class="fa fa-angle-right"></i></div>
									<div class="cicon">
										<a href="javascript:;" data-id="form6"><i class="fa fa-pencil"></i></a>
									</div>
								</div>
							</li>
							{/if}
						</ul>
					</div>
				</div>
				<div class="pull-left alert form" style="width:700px;position:relative;display:block;" id="form1">
					<h4>券面信息</h4>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 卡券类型</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">{$coupon_title}</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 卡券id</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">{$coupon['card_id']}</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 适用模块</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{if !empty($coupon['modules'])}
									{loop $coupon['modules'] $module}
										{$module['title']}&nbsp;
									{/loop}
								{else}
									所有模块适用
								{/if}
							</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 卡券标题</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">{$coupon['title']}</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 卡券副标题</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">{if !empty($coupon['sub_title'])}{$coupon['sub_title']}{else}无{/if}</p>
						</div>
					</div>
					{if $coupon['type'] == COUPON_TYPE_DISCOUNT}
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 卡券额度</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">{$coupon['extra_instruction']}</p>
						</div>
					</div>
					{elseif $coupon['type'] == COUPON_TYPE_CASH}
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 减免金额</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">{$coupon['detail']['reduce_cost']}元</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 抵扣条件</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">满{$coupon['detail']['least_cost']}元可用</p>
						</div>
					</div>
					{/if}
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 有效期</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
							{$coupon['extra_date_info']}
							</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 商户名称</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{$coupon['brand_name']}
							</p>
						</div>
					</div>
					<h4>投放信息</h4>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 库存</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{$coupon['quantity']}
							</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 领取限制</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								每个用户限领{$coupon['get_limit']}张
							</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 销券条码</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{if $coupon['code_type'] == 1}
								卡号
								{elseif $coupon['code_type'] == 2}
								二维码
								{else}
								条形码
								{/if}
							</p>
						</div>
					</div>
					{if COUPON_TYPE == WECHAT_COUPON}
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 操作提示</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{$coupon['notice']}
							</p>
						</div>
					</div>
					
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 分享设置</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{if $coupon['can_share']}用户可以分享领券链接{else}用户不能分享领券链接{/if}
							</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 转赠设置</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{if $coupon['can_give_friend']}用户领券后可转赠其他好友{else}用户领券后不能转赠其他好友{/if}
							</p>
						</div>
					</div>
					{/if}
					<h4>{$coupon_title}详情</h4>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 使用须知</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{$coupon['description']}
							</p>
						</div>
					</div>
					<div class="form-group marbot0">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 客服电话</label>
						<div class="col-sm-9 col-xs-12">
							<p class="form-control-static">
								{$coupon['service_phone']}
							</p>
						</div>
					</div>
					<h4>适用门店</h4>
					{if !empty($coupon['location_id_list'])}
						{loop $coupon['location_id_list'] $location}
							{$location['business_name']}
						{/loop}
					{else}
					适用于全部门店
					{/if}
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<span class="btn btn-primary col-lg-1" onclick="javascript:history.go(-1)">返回</span>
		</div>
	</form>
</div>
{template 'common/footer'}